export const routes = [
    {
        path: '/user',
        // component: '../layouts/UserLayout',
        routes: [
            {
                name: 'login',
                path: '/user/login',
                component: './user/login3',
            }
        ],
    },
    {
        path: '/consumer',
        component: '../layouts/SecurityLayout1',
        routes: [
            {
                path: '/consumer',
                component: '../layouts/UserBasicLayout',
                Routes: ['src/pages/Authorized'],
                routes: [
                    {
                        path: '/consumer',
                        redirect: '/consumer/page',
                    },
                    {
                        name: 'page',
                        path: '/consumer/page',
                        component: './consumer',
                    },
                ]
            }
        ]
    },
    {
        path: '/',
        component: '../layouts/SecurityLayout',
        routes: [
            {
                path: '/',
                component: '../layouts/BasicLayout',
                Routes: ['src/pages/Authorized'],
                routes: [
                    {
                        path: '/',
                        redirect: '/analysis',

                    },
                    // {
                    //     name: '数据表格',
                    //     path: '/demo',
                    //     icon: 'table',
                    //     component: './demo'
                    // },
                    {
                        name: '设备监控',
                        path: '/analysis',
                        icon: 'hdd',
                        tenant: ['admin', 'member'],
                        iconfont: 'icon-tongjifenxi',
                        component: './analysis',
                    },
                    {
                        path: 'data-screen',
                        name: '屏幕管理',
                        icon: 'desktop',
                        tenant: ['admin','member', 'big-screen'],
                        iconfont: 'icon-icon-',
                        authority: ['big-screen', 'admin'],
                        version: 'pro',
                        // component: './data-screen/screen',
                        routes: [
                            {
                                path: '/data-screen/category',
                                name: '屏幕分类',
                                icon: 'appstore',
                                tenant: ['admin'],
                                iconfont: 'icon-category-search-fill',
                                authority: ['big-screen', 'admin'],
                                version: 'pro',
                                component: './data-screen/category',
                            },
                            {
                                path: '/data-screen/screen',
                                name: '屏幕展示',
                                icon: 'fund',
                                tenant: ['admin', 'big-screen'],
                                iconfont: 'icon-screen',
                                authority: ['big-screen', 'admin'],
                                version: 'pro',
                                component: './data-screen/screen',
                            },
                            // {
                            //     path: '/data-screen/menu',
                            //     name: '对应菜单',
                            //     icon: 'fund',
                            //     tenant: ['admin', 'big-screen'],
                            //     iconfont: 'icon-screen',
                            //     authority: ['big-screen', 'admin'],
                            //     version: 'pro',
                            //     component: './data-screen/menu',
                            // }
                        ]
                    },
                    {
                        path: 'data-configuration',
                        name: '组态展示',
                        icon: 'tablet',
                        tenant: ['admin','member', 'device-monitor'],
                        iconfont: 'icon-icon-',
                        authority: ['device-monitor', 'admin'],
                        version: 'pro',
                        component: './data-screen/configuration',
                    },
                    {
                        path: 'data-video',
                        name: '视频服务',
                        icon: 'video-camera',
                        tenant: ['admin', 'big-screen'],
                        iconfont: 'icon-screen',
                        authority: ['big-screen', 'admin'],
                        version: 'pro',
                        component: './data-screen/video',
                    },

                    // {
                    //     path: 'order',
                    //     name: '工单管理',
                    //     icon: 'box-plot',
                    //     tenant: ['admin', 'member'],
                    //     iconfont: 'icon-device-manage',
                    //     authority: ['device-product', 'device-instance','device-alarm','firmware-manager','geo-manager', 'admin'],
                    //     routes: [
                    //         {
                    //             path: '/order/workorder',
                    //             name: '工单配置',
                    //             icon: 'wallet',
                    //             iconfont: 'icon-xieyiguanli',
                    //             authority: ['protocol-supports', 'admin'],
                    //             tenant: ['admin', 'member'],
                    //             component: './device/workorder',
                    //         },
                    //     ]
                    // },
                    {
                        path: 'device',
                        name: '设备监控',
                        icon: 'database',
                        tenant: ['admin', 'member'],
                        iconfont: 'icon-device-manage',
                        authority: ['device-product', 'device-instance','device-alarm','firmware-manager','geo-manager', 'admin'],
                        routes: [
                            {
                                path: '/device/product',
                                name: '产品参数',
                                icon: 'laptop',
                                iconfont: 'icon-shebei',
                                tenant: ['admin', 'member'],
                                authority: ['device-product', 'admin'],
                                component: './device/product',
                            },
                            {
                                hideInMenu: true,
                                path: '/device/product/save/:id',
                                name: '产品详情',
                                tenant: ['admin', 'member'],
                                iconfont: 'icon-shebei',
                                // authority: ['device-product'],
                                component: './device/product/save/Detail',
                            },
                            {
                                hideInMenu: true,
                                path: '/device/product/add',
                                name: '新建产品',
                                tenant: ['admin', 'member'],
                                iconfont: 'icon-shebei',
                                // authority: ['device-product'],
                                component: './device/product/save/add/index.tsx',
                            },
                            {
                                hideInMenu: true,
                                path: '/device/product/label',
                                name: '默认标签',
                                tenant: ['admin', 'member'],
                                iconfont: 'icon-shebei',
                                // authority: ['device-product'],
                                component: './device/product/label',
                            },
                            {
                                path: '/device/instance',
                                name: '设备信息',
                                icon: 'desktop',
                                tenant: ['admin', 'member'],
                                iconfont: 'icon-shebei1',
                                authority: ['device-instance', 'admin'],
                                version: 'pro',
                                component: './device/instance',
                            },
                            {
                                hideInMenu: true,
                                path: '/device/instance/save/:id',
                                name: '设备详情',
                                tenant: ['admin', 'member'],
                                iconfont: 'icon-shebei1',
                                component: './device/instance/editor',
                            },
                            {
                                hideInMenu: true,
                                path: '/device/group',
                                name: '分组',
                                icon: 'gold',
                                tenant: ['admin', 'member'],
                                authority: ['device-group', 'admin'],
                                version: 'pro',
                                iconfont: 'icon-shebeifenzuguanli',
                                component: './device/group',
                            },
                            {
                                // hideInMenu: true,
                                path: '/device/tree',
                                name: '设备分类',
                                tenant: ['admin', 'member'],
                                authority: ['device-group', 'admin'],
                                version: 'pro',
                                icon: 'gold',
                                component: './device/tree',
                            },
                            {
                                hideInMenu: true,
                                path: '/device/tree/detail',
                                name: '分组详情',
                                component: './device/tree/DeviceTree',
                            },
                            {
                                hideInMenu: true,
                                path: '/device/instance/add',
                                name: '添加设备',
                                tenant: ['admin', 'member'],
                                iconfont: 'icon-shebeifenzuguanli',
                                component: './device/instance/editor',
                            },
                            // {
                            //     path: '/device/gateway',
                            //     name: '网关',
                            //     icon: 'global',
                            //     tenant: ['admin', 'member'],
                            //     iconfont: 'icon-Group',
                            //     authority: ['device-gateway', 'admin'],
                            //     component: './device/gateway',
                            // },
                            {
                                path: '/device/location',
                                name: '设备定位',
                                icon: 'compass',
                                tenant: ['admin', 'member'],
                                authority: ['geo-manager', 'admin'],
                                version: 'pro',
                                iconfont: 'icon-diliweizhi',
                                component: './device/location',
                            },
                            {
                                path: '/device/firmware',
                                name: '硬件信息',
                                icon: 'cloud-sync',
                                tenant: ['admin'],
                                authority: ['firmware-manager', 'admin'],
                                version: 'pro',
                                iconfont: 'icon-gujianshengji',
                                component: './device/firmware',
                            },
                            {
                                hideInMenu: true,
                                tenant: ['admin'],
                                path: '/device/firmware/save/:id',
                                name: '固件详情',
                                iconfont: 'icon-gujianshengji',
                                component: './device/firmware/editor',
                            },
                            {
                                path: '/device/alarm',
                                name: '设备报警',
                                icon: 'alert',
                                tenant: ['admin', 'member'],
                                authority: ['device-alarm', 'admin'],
                                component: './device/alarmlog',
                            }
                        ],
                    },
                    {
                        path: 'network',
                        name: '设备连接',
                        iconfont: 'icon-shebei',
                        tenant: ['admin', 'member'],
                        icon: 'usb',
                        authority: ['certificate', 'network-config', 'device-gateway', 'protocol-supports', 'admin'],
                        routes: [
                            {
                                path: '/network/certificate',
                                name: '设备证书',
                                icon: 'book',
                                iconfont: 'icon-zhengshuguanli-',
                                authority: ['certificate', 'admin'],
                                tenant: ['admin', 'member'],
                                component: './network/certificate',
                            },
                            {
                                path: '/network/protocol',
                                name: '设备协议',
                                icon: 'wallet',
                                iconfont: 'icon-xieyiguanli',
                                authority: ['protocol-supports', 'admin'],
                                tenant: ['admin', 'member'],
                                component: './device/protocol',
                            },
                            {
                                path: '/network/type',
                                name: '组件管理',
                                icon: 'deployment-unit',
                                iconfont: 'icon-zujian',
                                tenant: ['admin', 'member'],
                                authority: ['network-config', 'admin'],
                                component: './network/type',
                            },
                            {
                                path: '/network/gateway',
                                name: '网关类型',
                                icon: 'cloud-server',
                                iconfont: 'icon-shebei',
                                tenant: ['admin', 'member'],
                                authority: ['device-gateway', 'admin'],
                                component: './network/gateway',
                            },
                        ],
                    },
                    {
                        path: 'notice',
                        name: '信息管理',
                        iconfont: 'icon-tongzhiguanli',
                        icon: 'notification',
                        tenant: ['admin', 'member'],
                        authority: ['template', 'notifier', 'admin'],
                        routes: [
                            {
                                path: '/notice/config',
                                name: '信息通知',
                                icon: 'alert',
                                tenant: ['admin', 'member'],
                                iconfont: 'icon-SUI_tongzhipeizhi',
                                authority: ['notifier', 'admin'],
                                component: './notice/config',
                            },
                            {
                                path: '/notice/template',
                                name: '信息模版',
                                icon: 'bell',
                                tenant: ['admin', 'member'],
                                iconfont: 'icon-tongzhiguanli',
                                authority: ['template', 'admin'],
                                component: './notice/template',
                            },
                        ],
                    },
                    {
                        path: 'rule-engine',
                        name: '规则引擎',
                        icon: 'file-excel',
                        iconfont: 'icon-guizeyinqing',
                        tenant: ['admin'],
                        authority: ['rule-model', 'rule-instance', 'rule-coordinated-control','sql-rule', 'admin'],
                        routes: [
                            {
                                path: '/rule-engine/model',
                                name: '规则模型',
                                icon: 'gateway',
                                tenant: ['admin'],
                                iconfont: 'icon-xian-buguize-moxing',
                                authority: ['rule-model', 'admin'],
                                version: 'pro',
                                component: './rule-engine/model',
                            },
                            {
                                path: '/rule-engine/instance',
                                name: '规则实例',
                                icon: 'block',
                                tenant: ['admin'],
                                iconfont: 'icon-hangweiguizeshili',
                                authority: ['rule-instance', 'admin'],
                                version: 'pro',
                                component: './rule-engine/instance',
                            },
                            {
                                path: '/rule-engine/control',
                                name: '联动控制',
                                icon: 'block',
                                tenant: ['admin'],
                                iconfont: 'icon-hangweiguizeshili',
                                authority: ['rule-coordinated-control', 'admin'],
                                version: 'pro',
                                component: './rule-engine/control',
                            },
                            {
                                path: '/rule-engine/sqlRule',
                                name: '数据转发',
                                icon: 'rise',
                                tenant: ['admin'],
                                iconfont: 'icon-datatransfer',
                                authority: ['rule-instance', 'admin'],
                                component: './rule-engine/sqlRule',
                            },
                            // {
                            //   path: '/rule-engine/email',
                            //   name: 'email',
                            //   icon: 'mail',
                            //   component: './rule-engine/email',
                            // },
                            // {
                            //   path: '/rule-engine/sms',
                            //   name: 'sms',
                            //   icon: 'message',
                            //   component: './rule-engine/sms',
                            // },
                        ],
                    },
                    {
                        path: 'simulator',
                        name: '设备模拟',
                        icon: 'rocket',
                        version: 'pro',
                        tenant: ['admin'],
                        authority: ['network-simulator', 'admin'],
                        routes: [
                            {
                                path: '/simulator/device',
                                name: '模拟测试',
                                version: 'pro',
                                icon: 'paper-clip',
                                tenant: ['admin'],
                                authority: ['network-simulator', 'admin'],
                                component: './simulator/device',
                            }
                        ]
                    },
                    {
                        path: 'logger',  
                        name: '设备日志',
                        icon: 'copy',
                        iconfont: 'icon-rizhiguanli',
                        authority: ['system-logger', 'access-logger', 'admin'],
                        routes: [
                            {
                                path: '/logger/access',
                                name: '访问日志',
                                icon: 'dash',
                                iconfont: 'icon-yonghufangwenrizhi',
                                authority: ['access-logger', 'admin'],
                                component: './logger/access',
                            },
                            {
                                path: '/logger/system',
                                name: '系统日志',
                                icon: 'ordered-list',
                                iconfont: 'icon-xitongrizhi',
                                authority: ['system-logger', 'admin'],
                                component: './logger/system',
                            },
                        ],
                    },
                    {
                        path:'system',
                        name:'设备权限',
                        iconfont: 'icon-shezhi',
                        icon: 'user-delete',
                        tenant: ['admin'],
                        authority: ['org-cust', 'dimension', 'user','permission', 'tenant-side-manager','tenant-manager', 'admin'],
                        routes: [
                            {
                                path: '/system/tenant1',
                                name: '机构管理',
                                icon: 'apartment',
                                iconfont: 'icon-jigoubianzhi',
                                tenant: ['admin'],
                                authority: ['org-cust', 'admin'],
                                version: 'pro',
                                component: './system/tenant1'
                            },
                            { 
                                path: '/system/role',
                                name: '角色管理',
                                icon: 'usergroup-add',
                                iconfont: 'icon-jiaoseguanli1',
                                tenant: ['admin'],
                                authority: ['dimension', 'admin'],
                                component: './system/role',
                            },
                            {
                                path: '/system/user',
                                name: '用户管理',
                                iconfont: 'icon-yonghuguanli',
                                icon: 'user',
                                tenant: ['admin'],
                                authority: ['user', 'admin'],
                                component: './system/users',
                            },
                            {
                                path: '/system/permission',
                                name: '菜单权限',
                                icon: 'key',
                                iconfont: 'icon-quanxianguanli',
                                authority: ['permission', 'admin'],
                                component: './system/permission',
                            },
                            {
                                hideInMenu: true,
                                path: '/system/tenant1/detail/:id',
                                name: '机构详情',
                                tenant: ['admin'],
                                authority: ['tenant-side-manager', 'tenant-manager','org-cust', 'admin'],
                                version: 'pro',
                                component: './system/tenant1/detail',
                            },
                        ]
                    },
                    {
                        name: '系统设置',
                        path: '/config',
                        icon: 'tool',
                        tenant: ['admin', 'member'],
                        iconfont: 'icon-xitongpeizhi',
                        authority: ['system-config', 'admin'],
                        component: './system/config',
                    },
                    {
                        name: '开放API',
                        path: '/open-api',
                        icon: 'share-alt',
                        iconfont: 'icon-APIguanli',
                        authority: ['open-api', 'admin'],
                        version: 'pro',
                        component: './system/open-api',
                    },
                    {
                        name: '文件管理',
                        path: '/files',
                        icon: 'folder-open',
                        tenant: ['admin', 'member'],
                        iconfont: 'icon-wenjianguanli',
                        component: './files',
                    },
                    // {
                    //     path: 'system',
                    //     name: '系统设置',
                    //     iconfont: 'icon-shezhi',
                    //     icon: 'setting',
                    //     tenant: ['admin'],
                    //     authority: ['user', 'tenant-side-manager', 'tenant-manager','role','dimension', 'dimension-org-rule-new','permission', 'dictionary', 'admin'],
                    //     routes: [
                    //         // {
                    //         //     path: '/system/tenant',
                    //         //     name: '租户管理1',
                    //         //     icon: 'team',
                    //         //     iconfont: 'icon-erji-zuhuguanli',
                    //         //     tenant: ['admin'],
                    //         //     authority: ['tenant-side-manager', 'tenant-manager', 'admin'],
                    //         //     version: 'pro',
                    //         //     component: './system/tenant'
                    //         // },
                    //         {
                    //             path: '/system/tenant1',
                    //             name: '机构管理',
                    //             icon: 'apartment',
                    //             iconfont: 'icon-jigoubianzhi',
                    //             tenant: ['admin'],
                    //             authority: ['org-cust', 'admin'],
                    //             version: 'pro',
                    //             component: './system/tenant1'
                    //         },
                    //         // {
                    //         //     path: '/system/org',
                    //         //     name: '机构管理',
                    //         //     icon: 'apartment',
                    //         //     tenant: ['admin', 'member'],
                    //         //     iconfont: 'icon-jigoubianzhi',
                    //         //     authority: ['dimension-org-rule-new', 'admin'],
                    //         //     component: './system/org',
                    //         // },
                    //         { 
                    //             path: '/system/role',
                    //             name: '角色管理',
                    //             icon: 'usergroup-add',
                    //             iconfont: 'icon-jiaoseguanli1',
                    //             authority: ['dimension', 'admin'],
                    //             component: './system/role',
                    //         },
                    //         {
                    //             path: '/system/user',
                    //             name: '用户管理',
                    //             iconfont: 'icon-yonghuguanli',
                    //             icon: 'user',
                    //             authority: ['user', 'admin'],
                    //             component: './system/users',
                    //         },
                    //         {
                    //             path: '/system/permission',
                    //             name: '权限管理',
                    //             icon: 'key',
                    //             iconfont: 'icon-quanxianguanli',
                    //             authority: ['permission', 'admin'],
                    //             component: './system/permission',
                    //         },
                    //         {
                    //             path: '/system/config',
                    //             name: '系统配置',
                    //             icon: 'tool',
                    //             tenant: ['admin', 'member'],
                    //             iconfont: 'icon-xitongpeizhi',
                    //             authority: ['system-config', 'admin'],
                    //             component: './system/config',
                    //         },
                    //         {
                    //             path: '/system/open-api',
                    //             name: 'OpenAPI',
                    //             icon: 'share-alt',
                    //             iconfont: 'icon-APIguanli',
                    //             authority: ['open-api', 'admin'],
                    //             version: 'pro',
                    //             component: './system/open-api',
                    //         },
                    //         // {
                    //         //     hideInMenu: true,
                    //         //     path: '/system/tenant/detail/:id',
                    //         //     name: '租户详情1',
                    //         //     tenant: ['admin'],
                    //         //     authority: ['tenant-side-manager', 'tenant-manager', 'admin'],
                    //         //     version: 'pro',
                    //         //     component: './system/tenant/detail',
                    //         // },
                    //         {
                    //             hideInMenu: true,
                    //             path: '/system/tenant1/detail/:id',
                    //             name: '机构详情',
                    //             tenant: ['admin'],
                    //             authority: ['tenant-side-manager', 'tenant-manager','org-cust', 'admin'],
                    //             version: 'pro',
                    //             component: './system/tenant1/detail',
                    //         },
                    //         {
                    //             path: '/system/access',
                    //             name: '访问日志',
                    //             icon: 'dash',
                    //             iconfont: 'icon-yonghufangwenrizhi',
                    //             authority: ['access-logger', 'admin'],
                    //             component: './logger/access',
                    //         },
                    //         {
                    //             path: '/system/system',
                    //             name: '系统日志',
                    //             icon: 'ordered-list',
                    //             iconfont: 'icon-xitongrizhi',
                    //             authority: ['system-logger', 'admin'],
                    //             component: './logger/system',
                    //         },
                    //         {
                    //             path: '/system/files',
                    //             name: '文件管理',
                    //             icon: 'ordered-list',
                    //             iconfont: 'icon-wenjianguanli',
                    //             authority: ['system-logger', 'admin'],
                    //             component: './files',
                    //         }
                    //     ],
                    // },
                    {
                        path: 'cloud',
                        name: '云云对接',
                        icon: 'cloud',
                        version: 'pro',
                        authority: ['dueros-product', 'admin'],
                        routes: [
                            {
                                path: '/cloud/duer',
                                name: 'DuerOS',
                                version: 'pro',
                                authority: ['dueros-product', 'admin'],
                                icon: 'cloud',
                                component: './cloud/dueros',
                            }
                        ]
                    },
                    {
                        path: 'account',
                        name: '个人中心',
                        icon: 'user',
                        hideInMenu: true,
                        routes: [
                            // {
                            //   path: '/account/center',
                            //   name: '个人中心',
                            //   icon: 'smile',
                            //   component: './account/center'
                            // },
                            {
                                path: '/account/settings',
                                name: '个人设置',
                                icon: 'setting',
                                component: './account/settings'
                            },
                            {
                                path: '/account/notification',
                                name: '通知订阅',
                                icon: 'bell',
                                component: './account/notification'
                            }
                        ]
                    },
                    // {
                    //   name: 'paramter',
                    //   path: '/properties',
                    //   inco: 'bar-chart',
                    //   component: './script-demo',
                    // },
                    {
                        name: 'exception',
                        icon: 'smile',
                        path: '/exception',
                        hideInMenu: true,
                        routes: [
                            {
                                path: './500',
                                name: '500',
                                component: './exception/500',
                            },
                            {
                                path: './404',
                                name: '404',
                                component: './exception/404',
                            },
                            {
                                path: './403',
                                name: '403',
                                component: './exception/403',
                            },
                        ],
                    },
                ],
            },
            {
                component: './404',
            },
        ],
    },
];
